package com.aaa.dang.common.util;

import lombok.Data;
import org.springframework.stereotype.Component;

/**
 * @author TeacherChen
 * @description 前后台数据库操作返回信息模型
 * @company AAA软件
 * @classname Qy78
 * 2018-6-14下午4:01:54
 */
@Component
public class ResultModel extends BaseContrllor {

    private int code = 0;//0成功，1失败
    private String msg;//返回提示信息
    private Object data;//返回内容
    private int count;//返回数据总数

    public void setCode(int code) {
        this.code = code;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public void setData(Object data) {
        this.data = data;
    }

    public void setCount(int count) {
        this.count = count;
    }

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

    public Object getData() {
        return data;
    }

    public int getCount() {
        return count;
    }

    @Override
    public String toString() {
        return "ResultModel{" +
                "code=" + code +
                ", msg='" + msg + '\'' +
                ", data=" + data +
                ", count=" + count +
                '}';
    }
}
